package com.jxt.app.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jxt.app.dao.base.ApiphoneDAO;
import com.jxt.app.entity.base.Apiphone;
import com.jxt.app.entity.base.ApiphoneExample;
import com.jxt.app.service.ApiphoneService;
import com.jxt.app.util.Page;

@Service
public class ApiphoneServiceImpl implements ApiphoneService{	
	@Resource
	private  ApiphoneDAO apiphoneDAO;
	
	@Override
	public int deleteModel(ApiphoneExample record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Page findListByExample(ApiphoneExample inparam, int page, int num)
			throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Apiphone getModelById(long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int insertModel(Apiphone record) {
		// TODO Auto-generated method stub
		int ret=0;
		try{
			apiphoneDAO.insert(record);
			ret=1;
		}catch(Exception e){
			e.printStackTrace();
			
		}
		return ret;
	}

	@Override
	public List<Apiphone> listModel(ApiphoneExample example) {
		// TODO Auto-generated method stub
		return apiphoneDAO.selectByExample(example);
	}

	@Override
	public int updateModel(ApiphoneExample record) {
		// TODO Auto-generated method stub
		return apiphoneDAO.updateByPrimaryKey(record);
	}

}
